@keyframes rotation {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes magentaPulse {
    from {
        background-color: #630030;
        -webkit-box-shadow: 0 0 9px #333;
    }
    50% {
        background-color: #a9014b;
        -webkit-box-shadow: 0 0 18px #a9014b;
    }
    to {
        background-color: #630030;
        -webkit-box-shadow: 0 0 9px #333;
    }
}


.jessibuca-container {


    .jessibuca-inner {

    }

    .jessibuca-hide {

    }

    .jessibuca-show {

    }


    .jessibuca-icon {
        cursor: pointer;
        width: 16px;
        height: 16px;
    }

    // poster
    .jessibuca-poster {
        position: absolute;
        z-index: 10;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: contain;
        pointer-events: none;
    }

    .jessibuca-play-big {
        position: absolute;
        display: none;
        height: 100%;
        width: 100%;
        background: rgba(0, 0, 0, 0.4);

        &:after {
            cursor: pointer;
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            display: block;
            width: 48px;
            height: 48px;
            background-image: url("../assets/play.png");
            background-repeat: no-repeat;
            background-position: center;
        }

        &:hover {
            &:after {
                background-image: url("../assets/play-hover.png");
            }
        }
    }

    .jessibuca-recording {
        display: none;
        position: absolute;
        left: 50%;
        top: 0;
        padding: 0 3px;
        transform: translateX(-50%);
        justify-content: space-around;
        align-items: center;
        width: 95px;
        height: 20px;
        background: #000000;
        opacity: 1;
        border-radius: 0px 0px 8px 8px;
        z-index: 1;

        .jessibuca-recording-red-point {
            width: 8px;
            height: 8px;
            background: #FF1F1F;
            border-radius: 50%;
            animation: magentaPulse 1s linear infinite;
        }

        .jessibuca-recording-time {
            font-size: 14px;
            font-weight: 500;
            color: #DDDDDD;
        }

        .jessibuca-icon-recordStop {
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }

    // loading
    .jessibuca-loading {
        display: none;
        //display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        z-index: 20;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    .jessibuca-loading-text {
        line-height: 20px;
        font-size: 13px;
        color: #fff;
        margin-top: 10px;
    }

    .jessibuca-controls {
        background-color: #161616;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        position: absolute;
        z-index: 40;
        left: 0;
        right: 0;
        bottom: 0;
        height: 38px;
        width: 100%;
        padding-left: 13px;
        padding-right: 13px;
        font-size: 14px;
        color: #fff;
        opacity: 0;
        visibility: hidden;
        //transition: all 0.2s ease-in-out;
        user-select: none;
        //transition: width .5s ease-in;

        .jessibuca-controls-item {
            position: relative;
            display: flex;
            justify-content: center;
            padding: 0 8px;

            &:hover .icon-title-tips {
                visibility: visible;
                opacity: 1;
            }
        }

        .jessibuca-microphone-close {
            display: none;
        }

        .jessibuca-icon-audio {
            display: none;
        }

        .jessibuca-play {
            display: none;
        }

        .jessibuca-pause {
            display: none;
        }

        .jessibuca-fullscreen-exit {
            display: none;
        }

        .jessibuca-screenshot {
            display: none;
        }

        .jessibuca-record {
            display: none;
        }

        .jessibuca-fullscreen {
            display: none;
        }


        .jessibuca-record-stop {
            display: none;
        }

        .jessibuca-icon-audio, .jessibuca-icon-mute {
            z-index: 1;
        }


        .jessibuca-controls-bottom {
            display: flex;
            justify-content: space-between;
            height: 100%;

            .jessibuca-controls-left {
                display: flex;
                align-items: center;
            }

            .jessibuca-controls-right {
                display: flex;
                align-items: center;
            }
        }
    }

    &.jessibuca-controls-show {
        .jessibuca-controls {
            opacity: 1;
            visibility: visible;
        }
    }

    &.jessibuca-controls-show-auto-hide {
        .jessibuca-controls {
            opacity: 0.8;
            visibility: visible;
            display: none;
        }
    }

    &.jessibuca-hide-cursor {
        * {
            cursor: none !important;
        }
    }


    .jessibuca-icon-loading {
        width: 50px;
        height: 50px;
        background: url("../assets/loading.png") no-repeat center;
        background-size: 100% 100%;
        animation: rotation 1s linear infinite;
    }

    .jessibuca-icon-screenshot {
        background: url("../assets/screenshot.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/screenshot-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-play {
        background: url("../assets/play.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/play-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-pause {
        background: url("../assets/pause.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/pause-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }


    .jessibuca-icon-record {
        background: url("../assets/record.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/record-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-recordStop {
        background: url("../assets/record-stop.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/record-stop-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-fullscreen {
        background: url("../assets/fullscreen.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/fullscreen-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-fullscreenExit {
        background: url("../assets/exit-fullscreen.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/exit-fullscreen-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-audio {
        background: url("../assets/audio.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/audio-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }

    .jessibuca-icon-mute {
        background: url("../assets/mute.png") no-repeat center;
        background-size: 100% 100%;

        &:hover {
            background: url("../assets/mute-hover.png") no-repeat center;
            background-size: 100% 100%;
        }
    }


    .jessibuca-icon-text {
        font-size: 14px;
        width: 30px;
    }

    .jessibuca-speed {
        font-size: 14px;
        color: #fff;
    }

    .jessibuca-quality-menu-list {
        position: absolute;
        left: 50%;
        bottom: 100%;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-50%);
        transition: visibility 300ms, opacity 300ms;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 4px;


        &.jessibuca-quality-menu-shown {
            visibility: visible;
            opacity: 1;
        }
    }

    .icon-title-tips {
        pointer-events: none;
        position: absolute;
        left: 50%;
        bottom: 100%;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-50%);
        transition: visibility 300ms ease 0s, opacity 300ms ease 0s;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
    }

    .icon-title {
        display: inline-block;
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
        color: rgb(255, 255, 255);
    }


    .jessibuca-quality-menu {
        padding: 8px 0;
    }

    .jessibuca-quality-menu-item {
        display: block;
        height: 25px;
        margin: 0;;
        padding: 0 10px;
        cursor: pointer;
        font-size: 14px;
        text-align: center;
        width: 50px;
        color: rgba(255, 255, 255, 0.5);
        transition: color 300ms, background-color 300ms;

        &:hover {
            background-color: rgba(255, 255, 255, 0.2)
        }

        &:focus {
            outline: none;
        }

        &.jessibuca-quality-menu-item-active {
            color: #2298FC;
            //background-color: rgba(255, 255, 255, 0.2)
        }
    }

    .jessibuca-volume-panel-wrap {
        position: absolute;
        left: 50%;
        bottom: 100%;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-50%) translateY(22%);
        transition: visibility 300ms, opacity 300ms;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
        height: 120px;
        width: 50px;
        overflow: hidden;

        &.jessibuca-volume-panel-wrap-show {
            visibility: visible;
            opacity: 1;
        }
    }

    .jessibuca-volume-panel {
        cursor: pointer;
        position: absolute;
        top: 21px;
        height: 60px;
        width: 50px;
        overflow: hidden;
    }

    .jessibuca-volume-panel-text {
        position: absolute;
        left: 0;
        top: 0;
        width: 50px;
        height: 20px;
        line-height: 20px;
        text-align: center;
        color: #fff;
        font-size: 12px;
    }

    .jessibuca-volume-panel-handle {
        position: absolute;
        top: 48px;
        left: 50%;
        width: 12px;
        height: 12px;
        border-radius: 12px;
        margin-left: -6px;
        background: #fff;

        &::before {
            bottom: -54px;
            background: #fff;
        }

        &::after {
            bottom: 6px;
            background: rgba(255, 255, 255, .2);
        }

        &::before, &::after {
            content: '';
            position: absolute;
            display: block;
            left: 50%;
            width: 3px;
            margin-left: -1px;
            height: 60px
        }
    }


    //
    &.jessibuca-fullscreen-web {
        .jessibuca-controls {
            width: 100vh;
            //transform: translateX(call(50vh - 100vw)) translateY(0) rotate(270deg);
            //transition: width 0.5s ease-in
        }

        .jessibuca-play-big {
            &:after {
                transform: translate(-50%,-50%) rotate(270deg);
            }
        }

        .jessibuca-loading {
            flex-direction: row;
        }

        .jessibuca-loading-text {
            transform: rotate(270deg);
        }

    }
}
